Ref

class Ref<T>(value: T)

A mutable reference to a value. About as simple as it gets. The value stored is volatile

Author

fzzyhmstrs

Since

0.6.0

Parameters

T

the type of value referenced by this

value

stored value to reference to and update as needed

Constructors

Link copied to clipboard
constructor(value: T)

Functions

Link copied to clipboard
fun get(): T

Retrieves the stored value

Link copied to clipboard
fun set(value: T)

Updates the stored value with the provided input